Carbon


CollectionExceptionProcPtr

Header: Collections.h Carbon status: Supported

Defines a pointer to an error handling callback function. Your error handling callback function handles errors that occur when operating on a collection object.

typedef OSErr(* CollectionExceptionProcPtr) (
    Collection c, 
    OSErr status
);

You would declare your function like this if you were to name it MyCollectionExceptionCallback:

OSErr MyCollectionExceptionCallback (
    Collection c, 
    OSErr status
);
c

A reference to the collection object for which the error occurred.

status

The result code associated with the error that occurred.

function result

A result code.

DISCUSSION

You create this function to install in a collection object using the SetCollectionExceptionProc function. Subsequently, whenever the Collection Manager is operating on that collection object and an error occurs, the Collection Manager calls this function, sending it a reference to the collection for which the error occurred and the result code associated with the error. You can use this information to handle the error appropriately for your application.

You can use an exception procedure to respond to an error in a number of ways:

To install an exception procedure in a collection object, use the SetCollectionExceptionProc function.

To obtain a pointer to an existing exception procedure in a collection object, use the GetCollectionExceptionProc function.

AVAILABILITY

Supported in Carbon.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)